package day06;

public class practice {
    public static void main(String[] args) {

        say();
        sayHi("ac");
        sayHello("sc",23);
        double a=getNum();
        System.out.println(a);
        int b=plus(20,21);
        System.out.println("结果为："+b);
        int[] c=testArray(5,100);
       System.out.println("数组的第一个值为："+c[0]);

    }

    public static  void say(){
        System.out.println("继续执行。。。。");
    }

    public  static void sayHi(String name){
        System.out.println("大家好，我叫"+name+"今年12岁了。");
    }

    public static void sayHello(String name,int age){
        System.out.println("大家好，我叫"+name+"今年"+age+"岁了");

    }

    public static double getNum(){

        return 5.0;

        }
    public static int plus(int num1,int num2){
        int num=num1+num2;
        return num;
    }

    public static int[] testArray(int a,int max){
        int[] arr=new int[a];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*(max+1));
            System.out.println(arr[i]);
        }

        return arr;
    }
}
